\documentclass{ctexbeamer}
\usetheme[min]{sjtubeamer}
\begin{document}
\begin{frame}[fragile]
  \frametitle{代码块}
  \begin{codeblock}
    [language=c++]
    {C++代码}
#include<iostream>

int main(){
  // Console Output
  std::cout << "Hello, SJTU!" << std::endl;
  return 0;
}
  \end{codeblock}
\end{frame}
\end{document}